.editListing {
  form {
    label {
      line-height: 1.5;
      margin-bottom: 5px;
    }

    .helper {
      padding: $padSm;
      padding-left: 0;
    }
  }

  .modalContent {
    overflow: hidden;
    min-height: 0;

    .topControls {
      z-index: 1;
    }

    .tile {
      width: 100px;
      height: 100px;
      border: 1px solid;
      border-color: inherit;
      border-radius: $corner;
      float: left;
      margin-right: $pad;
      margin-bottom: $pad;
      position: relative;

      .closeIcon {
        width: 24px;
        height: 24px;
        position: absolute;
        top: 0;
        left: 0;
      }

      .btn {
        width: 61px;
        height: 28px;
        position: absolute;
        bottom: 10px;
        padding: 0;
        line-height: 1;
        @include center(true, false)
      }
    }

    .tabContent {
      .cryptoTypeWrap {
        .cryptoCurrencyType {
          .titleWrap {
            .cryptoIcon {
              width: 20px;
              height: 20px;
            }
          }

          .cryptoQuantityCoinType, .cryptoPriceModifierPercentSymbol {
            position: absolute;
            right: 15px;
            top: 12px;
          }
        }
      }

      .photoUploadSection {
        h2 {
          display: inline-block;
        }

        .uploadingLabel {
          float: right;
        }

        .uploadItems {
          display: table; // clear the floats

          li {
            background-repeat: no-repeat;
            background-position: center center;
            background-size: cover;
            cursor: move;

            &:nth-last-child(-n + 6):nth-child(6n + 1), // first element of the last row
            &:nth-last-child(-n + 6):nth-child(6n + 1) ~ li { // all its following elements
              margin-bottom: 0;
            }

            &.addElement {
              cursor: default;

              .imagesIcon {
                font-size: 50px;
                @include center;
                top: 35%;
              }
            }

            .primaryIndicatorWrap {
              display: none;
            }

            &:nth-child(2) {
              .primaryIndicatorWrap {
                position: absolute;
                bottom: 5px;
                left: 0;
                right: 0;
                display: block;
                text-align: center;

                .phraseBox {
                  display: inline-block;
                }
              }
            }
          }
        }
      }

      .shippingSection {
        .tile {
          .locationIcon {
            font-size: 38px;
            @include center;
            top: 34%;
          }
        }

        form {
          label {
            font-weight: 400;
          }

          .servicesWrap {
            .flexRow {
              padding-left: 0;
              padding-right: 0;

              .btnRemoveService {
                height: auto;
                width: 50px;
              }

              &:first-child {
                padding-top: 0;
              }
            }

            & > .flexRow:first-child {
              .btnRemoveService {
                display: none;
              }
            }
          }
        }

        .topLevelShipOptErrs {
          display: none;
        }

        .shippingOptionsWrap {
          &:empty + .shipOptPlaceholder {
            .topLevelShipOptErrs {
              display: block;
            }
          }

          .selectize-control .selectize-input .region {
            display: none;
          }
        }
      }

      .couponsSection {
        .couponsContainer {
          display: none;
        }

        &.expandedCouponView {
          .couponsContainer {
            display: block;
          }

          .btnAddCoupon {
            display: none;
          }
        }

        .coupon {
          padding-left: 0;
          padding-right: 0;

          .inputSelect {
            input {
              padding-right: 94px;
            }

            .select2-container {
              width: 93px !important;
            }

            &::after {
              right: 94px;
            }
          }

          .btnRemoveCoupon {
            height: auto;
            width: 50px;
          }
        }
      }

      .variantsSection {
        &.expandedVariantsView {
          .variantsContainer {
            display: block;
          }

          .addFirstVariant {
            display: none;
          }
        }

        .variantsContainer {
          display: none;

          .variant {
            padding-left: 0;
            padding-right: 0;

            .select2-selection__choice {
              margin-top: 6px;
            }

            .select2-search__field {
              height: 22px;
            }

            .btnRemoveVariant {
              height: 42px;
              width: 50px;
            }

            &.hasError {
              .variantNameInput {
                margin-top: auto; // needed so fields in same row align if only one has an error
                position: relative;
                top: -4px; // needed cause it's not so easy to line up with select2 fields
              }
            }
          }
        }
      }

      .variantInventorySection {
        .inventoryTableWrap {
          overflow: auto;
          max-height: 500px;
        }

        table {
          border-spacing: 0;
          border-collapse: collapse;
          width: 100%;

          th {
            text-align: left;
          }

          td, th {
            border-width: 1px;
            border-style: solid;
            padding: $pad;
            word-break: break-word;
            min-width: 90px;
            max-width: 125px;

            input[type=text] {
              width: 100%;
            }

            &.unconstrainedWidth {
              white-space: nowrap;
              width: auto;
              max-width: none;

              .errorList {
                max-width: 225px;
                white-space: normal;
              }
            }

            &.quantityCol {
              input[type=text] {
                min-width: 75px;
              }
            }
          }
        }
      }

      .inventoryManagementSection {
        .quantityInput {
          width: 100px;
        }
      }
    }
  }

  &.notTrackingInventory {
    .modalContent .tabContent {
      .variantInventorySection {
        .quantityCol {
          display: none;
        }
      }
    }
  }

  .tab-shipping,
  .shippingSection,
  .shippingFromSection,
  .conditionWrap {
    display: none;
  }

  .cryptoTypeWrap {
    display: none;
  }

  &.TYPE_PHYSICAL_GOOD {
    .tab-shipping,
    .conditionWrap,
    .shippingSection {
      display: block;
    }
  }

  &.TYPE_PHYSICAL_GOOD {
    .tab-shippingFrom,
    .conditionWrap,
    .shippingFromSection {
      display: block;
    }
  }

  &.TYPE_CRYPTOCURRENCY {
    .tab-variants,
    .tab-coupons {
      display: none;
    }

    .modalContent {
      .standardTypeWrap,
      .variantsSection,
      .inventoryManagementSection,
      .variantInventorySection,
      .couponsSection {
        display: none;
      }

      .cryptoTypeWrap {
        display: block;
      }

      .skuMatureContentRow {
        display: none;
      }

      .acceptedCurrenciesSection {
        display: none;
      }
    }
  }

  .viewListingLinks {
    display: none;
  }

  &.editMode {
    .viewListingLinks {
      display: block;
    }
  }
}
